<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=1">
    <title>Navigation Bar</title>
    <link rel="stylesheet" href="../css/reset.css">
    <style>
        li {
            list-style: none;
        }

        /* 设置nav */
        .nav {
            width: 1172px;
            height: 48px;
            background-color: #e8e7e3;
            margin: 100px auto;
        }

        .nav li {
            float: left;
            height: 48px;
            /* 将元素在父元素中垂直居中 */
            line-height: 48px;
        }

        .nav a {
            text-decoration: none;
            color: #777;
            font-size: 18px;
            font-family: Arial, Helvetica, sans-serif;
            display: block;
            padding: 0px 39px;
        }

        .nav a:hover {
            background-color: #3f3f3f;
            color: #e8e7e3;
        }
    </style>
</head>

<body>
    <ul class="nav">
        <li>
            <a href="#">HTML/CSS</a>
        </li>
        <li>
            <a href="#">Browser Side</a>
        </li>
        <li>
            <a href="#">Server Side</a>
        </li>
        <li>
            <a href="#">Programming</a>
        </li>
        <li>
            <a href="#">XML</a>
        </li>
        <li>
            <a href="#">Web Building</a>
        </li>
        <li>
            <a href="#">Reference</a>
        </li>
    </ul>
</body>

</html>